# -*- coding:utf-8 -*-

from com.mat.rpa.utils.globalConstants import GlobalConstants
from com.mat.rpa.views.workWindow.leftPanel.directiveTree import treeItem
from . import SAPOperationConstants

class SAPOperationSubDirectiveTree(treeItem.TreeItemWithID):
    def __init__(self, parent):
        super(SAPOperationSubDirectiveTree, self).__init__(parent)
        self.createSAPOPerationTreeNode()

    def createSAPOPerationTreeNode(self):
        self.nodeType = GlobalConstants.treeBranchType
        self.directiveType = "SAPOperation"
        self.setText(0,"SAP操作")
        self.createTreeNode(GlobalConstants.treeLeafType,
                            self, SAPOperationConstants.SAPOperationConstants.selectingSAPTreeNodeDirective, "选中树节点(SAP)")
        self.createTreeNode(GlobalConstants.treeLeafType,
                            self, SAPOperationConstants.SAPOperationConstants.gettingSAPTableCellDirective, "获取单元格(SAP)")
        self.createTreeNode(GlobalConstants.treeLeafType,
                            self, SAPOperationConstants.SAPOperationConstants.gettingRowCountOfSAPTableDirective,
                            "获取表格总行数(SAP)")
        self.createTreeNode(GlobalConstants.treeLeafType,
                            self, SAPOperationConstants.SAPOperationConstants.gettingColumnCountOfSAPTableDirective,
                            "获取表格总列数(SAP)")